![]() |
GetThreadStateGivenTaskRef |
||||
Header: | Threads.h | Carbon status: | Supported | |
Obtains the state of a thread when your application is not necessarily the current processófor example, during execution of an interrupt function.
OSErr GetThreadStateGivenTaskRef ( ThreadTaskRef threadTRef, ThreadID threadToGet, ThreadState *threadState );
The thread task reference of the application containing the thread whose state you want to determine.
The thread ID of the thread whose state you want to determine.
A pointer to a thread state variable in which the function places the state of the specified thread.
A result code.
You can use GetThreadStateGivenTaskRef at times when you arenít guaranteed that your application is the current context, such as during execution of an interrupt function. In such cases you must identify the thread task reference (the application context) as well as the thread ID.
To determine the thread task reference (application context) for your application, use the GetThreadCurrentTaskRef function.
To change the state of a thread from stopped to ready when your application is not the current process, use the SetThreadReadyGivenTaskRef function.
Supported in Carbon. Available in CarbonLib 1.0 and later when ThreadsLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by ThreadsLib 1.0 and later.
© 2000 Apple Computer, Inc. — (Last Updated 3/8/2000)